package com.fable.etl.web;

import com.fable.etl.dto.TestBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Author lw
 * @Date 2019/7/1 10:23
 * @Version 1.0
 */
@RestController
@RequestMapping("/etltest")
@Slf4j
@Api(value="etl测试",description = "etl测试Controller")
public class TestController {
    @ApiOperation(value="测试Method的URL")
    @RequestMapping(value="/testMethod",method = RequestMethod.POST)
    public String etlTestMethod(@RequestBody String json){
        log.info("打印日志："+json);
        return "hello world";
    }

    @ApiOperation(value="测试Bean的URL")
    @RequestMapping(value="/testBean",method = RequestMethod.POST)
    public String etlTestBean(@RequestBody TestBean testBean){
        return "hello "+testBean.getName();
    }
}
